//
//  KYDoctorInfoModel.m
//  kuaiyi
//
//  Created by 杨亮 on 16/3/17.
//  Copyright © 2016年 kuaiyi. All rights reserved.
//

#import "KYDoctorInfoModel.h"
#import "KYNetTool.h"
#import <MJExtension.h>

@implementation KYDoctorInfoModel
+(void)getDoctorInfoModelSuccess:(void(^)(KYDoctorInfoModel *doctorInfoModel))success withDoctor_id:(NSInteger)doctor_id{
    NSString *url = @"http://iosapi.itcast.cn/getDoctorInfo.json.php";
    NSDictionary *paramDic = @{@"login_token":@"985c96ce43bb5ef69de3e1ad8afaa83f",@"user_id":@(1000089),@"doctor_id":@(doctor_id)};
    [[KYNetTool shareManager] POST:url parameters:paramDic progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:nil];
        NSDictionary *dictionary = dict[@"data"];
        KYDoctorInfoModel *model = [KYDoctorInfoModel mj_objectWithKeyValues:dictionary];
        if (success) {
            success(model);
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        NSLog(@"%@",error.description);
    }];
}
@end
